package com.wangsai.framework.supersecurity.zuul;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Mr.Wang
 * @date 2021-08-14 23:54
 */
@Configuration
public class SuperSecurityZuulConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public NotLoginZuulHandler notLoginZuulHandler() {
        return new DefaultNotLoginZuulHandler();
    }

    @Bean
    public SuperSecurityZuulFilter superSecurityZuulFilter(NotLoginZuulHandler notLoginZuulHandler) {
        return new SuperSecurityZuulFilter(notLoginZuulHandler);
    }

}